package com.efast.dmom.mgmt.controller.les;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.entity.les.TwOutbTaskDetail;
import com.efast.dmom.mgmt.service.les.TwOutbTaskDetailService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;

/**
 * 拣货任务表 TW_OUTB_TASK_DETAIL
 * @author chlp
 */
@Controller
@RequestMapping(value="/twOutbTaskDetail")
@Api(value = "/twOutbTaskDetail", description = "拣货任务表Detail")
public class TwOutbTaskDetailController {
	
	@Autowired
	private TwOutbTaskDetailService twOutbTaskDetailService;
	
	/**
	 * e)实现某行取消拣货，单行变成新单，整单变成部分拣货 
	 * 
	 * 实际捡货数量字段需要增加。可捡货数量需要减去。
	 * 实际捡货箱数字段需要增加。可捡货箱数需要减去。
	 * @param twDocAsnHeader
	 * @return
	 */
	@RequestMapping(value = "/cancelPicking" , method=RequestMethod.POST)
	public @ResponseBody ResultBean cancelPicking(@RequestBody TwOutbTaskDetail twOutbTaskDetail){
		ResultBean result=new ResultBean(true,"'");
		twOutbTaskDetailService.updateNonEmptyTwOutbTaskDetailById(twOutbTaskDetail);
		return result;
	}

}
